{% extends 'Base/main.content.lists.div.html.twig' %}{% import 'Base/list_item.twig' as listItem %}
{% block options %}
    <div class="menu-list">
        {#{{ dump(tools) }}#}
        {% for key , classes in tools %}
            {% set default = "请选择分类" %}
            {% set classes = classes %}
            <div class="layui-inline">
                <select name="cond[{{ key }}]" onchange="javascript:__doPostBack('searchCond','')" >
                    <option value="" {{app.request.get("cond")[key] is defined and app.request.get("cond")[key] == "" ? ' selected="selected"' : "" }} >{{ default }}</option>
                    {% for class in classes %}
                        <option value="{{ class.id }}"
                                {{app.request.get("cond")[key] is defined and  app.request.get("cond")[key] == class.id ? ' selected="selected"' : "" }}
                        >{{ class.name }}</option>
                    {% endfor %}
                </select>
            </div>
        {% endfor %}
    </div>
{% endblock %}
{% block tableHead %}
    <tr>
        <th width="3%">选择</th>
        <th align="left" width="10%">分组</th>
        <th align="left">权限</th>
        <th align="left">权限编码</th>
        <th align="center" width="10%">管理</th>
    </tr>
{% endblock %}
{% block tableList %}
    {% for Entity in lists %}
        <tr>
            <td align="center">
                <span class="checkall" style="vertical-align:middle;">
                    <input lay-skin="primary" type="checkbox" name="ids[]" value="{{ Entity.AdminMenuUser_id }}"/>
                </span>
            </td>
            <td align="left">{{ Entity.UserGroups_name }}</td>
            <td align="left">{{ Entity.AdminMenu_name }}</td>
            <td align="left">{{ Entity.AdminMenu_link }}</td>
            <td align="center">
                {#<a href="{{ path("AdminMenuUserPreAdd") }}?parent={{ Entity.AdminMenuUser_id }}" class="layui-btn layui-btn-normal layui-btn-sm"><span class="fa fa-plus c13"></span></a>#}
                <a href="{{ path("AdminMenuUserPreEdit",{'id':Entity.AdminMenuUser_id}) }}" class="layui-btn layui-btn-normal layui-btn-sm"><span class="fa fa-edit c13"></span></a>
            </td>
        </tr>
    {% endfor %}
{% endblock %}
{% block script %}
{% endblock %}

